#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string s;
	string md = "GPLT";
	string bf = "gplt";
	unordered_map<char, int> cnt;

	cin >> s;
	for (auto ii : s) {
		if (md.find(ii) != string::npos)
			cnt[ii]++;
		if (bf.find(ii) != string::npos)
			cnt[ii - 'a' + 'A']++;
	}


	for (int _ = 1; _ <= 10000; _++)
		for (auto i : md) {
			if (cnt[i]) {
				cout << i;
				cnt[i]--;
			}
		}
	return 0;
}
